import { requestApi, baiduApi } from 'boot/main'

// 
export default {
  // 账户登录
  Account (url, data) {
    return requestApi({
      url: 'account/' + url,
      method: 'post',
      data
    })
  },

  // 上传图片
  uploadImg (url, data) {
    return requestApi({
      url: 'uploadfiles/' + url,
      method: 'post',
      data
    })
  },

  // 分类操作通用接口
  // params
  MColumnOptionParams (url, method, params) {
    return requestApi({
      url: 'MColumn/' + url,
      method,
      params
    })
  },
  // data
  MColumnOptionData (url, method, data) {
    return requestApi({
      url: 'MColumn/' + url,
      method,
      data
    })
  },

  // 综合首页-基本信息
  // params
  BaseInfoParams (url, method, params) {
    return requestApi({
      url: 'baseinfo/' + url,
      method,
      params
    })
  },
  // data
  BaseInfoData (url, method, data) {
    return requestApi({
      url: 'baseinfo/' + url,
      method,
      data
    })
  },

  // 文章分类
  // params
  ArticleCategoryParams (url, method, params) {
    return requestApi({
      url: 'ArticleCategory/' + url,
      method,
      params
    })
  },
  // data
  ArticleCategoryData (url, method, data) {
    return requestApi({
      url: 'ArticleCategory/' + url,
      method,
      data
    })
  },

  // 文章管理
  // params
  ArticlesParams (url, method, params) {
    return requestApi({
      url: 'Articles/' + url,
      method,
      params
    })
  },
  // data
  ArticlesData (url, method, data) {
    return requestApi({
      url: 'Articles/' + url,
      method,
      data
    })
  },

  // 产品分类
  // params
  ProductCategoryParams (url, method, params) {
    return requestApi({
      url: 'ProductsCategory/' + url,
      method,
      params
    })
  },
  // data
  ProductCategoryData (url, method, data) {
    return requestApi({
      url: 'ProductsCategory/' + url,
      method,
      data
    })
  },

  // 产品管理
  // params
  ProductsParams (url, method, params) {
    return requestApi({
      url: 'Products/' + url,
      method,
      params
    })
  },
  // data
  ProductsData (url, method, data) {
    return requestApi({
      url: 'Products/' + url,
      method,
      data
    })
  },

  // 图片分类
  // params
  PictureCategoryParams (url, method, params) {
    return requestApi({
      url: 'PicturesCategory/' + url,
      method,
      params
    })
  },
  // data
  PictureCategoryData (url, method, data) {
    return requestApi({
      url: 'PicturesCategory/' + url,
      method,
      data
    })
  },

  // 图片管理
  // params
  PicturesParams (url, method, params) {
    return requestApi({
      url: 'Pictures/' + url,
      method,
      params
    })
  },
  // data
  PicturesData (url, method, data) {
    return requestApi({
      url: 'Pictures/' + url,
      method,
      data
    })
  },

  // 广告图片分类
  // params
  AdCategoryParams (url, method, params) {
    return requestApi({
      url: 'AdvertCategory/' + url,
      method,
      params
    })
  },
  // data
  AdCategoryData (url, method, data) {
    return requestApi({
      url: 'AdvertCategory/' + url,
      method,
      data
    })
  },

  // 广告图片管理
  // params
  AdsParams (url, method, params) {
    return requestApi({
      url: 'Advert/' + url,
      method,
      params
    })
  },
  // data
  AdsData (url, method, data) {
    return requestApi({
      url: 'Advert/' + url,
      method,
      data
    })
  },

  // 问答分类
  // params
  QACategoryParams (url, method, params) {
    return requestApi({
      url: 'QuesAnCategory/' + url,
      method,
      params
    })
  },
  // data
  QACategoryData (url, method, data) {
    return requestApi({
      url: 'QuesAnCategory/' + url,
      method,
      data
    })
  },

  // 问答管理
  // params
  QAsParams (url, method, params) {
    return requestApi({
      url: 'QuesAns/' + url,
      method,
      params
    })
  },
  // data
  QAsData (url, method, data) {
    return requestApi({
      url: 'QuesAns/' + url,
      method,
      data
    })
  },

  // 上传下载分类
  // params
  UpDownCategoryParams (url, method, params) {
    return requestApi({
      url: 'updownCategory/' + url,
      method,
      params
    })
  },
  // data
  UpDownCategoryData (url, method, data) {
    return requestApi({
      url: 'updownCategory/' + url,
      method,
      data
    })
  },

  // 上传下载管理
  // params
  UpDownParams (url, method, params) {
    return requestApi({
      url: 'UpDown/' + url,
      method,
      params
    })
  },
  // data
  UpDownData (url, method, data) {
    return requestApi({
      url: 'UpDown/' + url,
      method,
      data
    })
  },

  // 友情链接
  // params
  BlogrollsParams (url, method, params) {
    return requestApi({
      url: 'Blogrolls/' + url,
      method,
      params
    })
  },
  // data
  BlogrollsData (url, method, data) {
    return requestApi({
      url: 'Blogrolls/' + url,
      method,
      data
    })
  },



  // 联系
  // params
  ContactParams (url, method, params) {
    return requestApi({
      url: 'ContactUs/' + url,
      method,
      params
    })
  },
  // data
  ContactData (url, method, data) {
    return requestApi({
      url: 'ContactUs/' + url,
      method,
      data
    })
  },

  // 招聘
  // params
  RecruitParams (url, method, params) {
    return requestApi({
      url: 'Recruit/' + url,
      method,
      params
    })
  },
  // data
  RecruitData (url, method, data) {
    return requestApi({
      url: 'Recruit/' + url,
      method,
      data
    })
  },

  // 角色
  // params
  RoleManageParams (url, method, params) {
    return requestApi({
      url: 'RoleManage/' + url,
      method,
      params
    })
  },
  // data
  RoleManageData (url, method, data) {
    return requestApi({
      url: 'RoleManage/' + url,
      method,
      data
    })
  },

  // 用户
  // params
  UserManageParams (url, method, params) {
    return requestApi({
      url: 'UserManage/' + url,
      method,
      params
    })
  },
  // data
  UserManageData (url, method, data) {
    return requestApi({
      url: 'UserManage/' + url,
      method,
      data
    })
  },

  // 百度
  // 普通IP定位
  BaiduGeoCodingParams (params) {
    return baiduApi({
      url: 'geocoding/v3/?output=json',
      method: 'get',
      params
    })
  }
}